//
//  CrashHandler.m
//  crashreport
//
//  Created by william on 12-8-8.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "CrashHandler.h"
#import "Common.h"
#import "CrashNotificationCenter.h"

kern_return_t   catch_exception_raise_state_identity
(mach_port_t                          exception_port,
 mach_port_t                                  thread,
 mach_port_t                                    task,
 exception_type_t                          exception,
 exception_data_t                               code,
 mach_msg_type_number_t                   code_count,
 int *                                        flavor,
 thread_state_t                             in_state,
 mach_msg_type_number_t               in_state_count,
 thread_state_t                            out_state,
 mach_msg_type_number_t *            out_state_count)
{
    CRSay(@"Thread:0x%x crashed!", thread);
#ifdef __i386__
    x86_thread_state32_t *pState = (x86_thread_state32_t *)in_state;
    
#elif __arm__
    //fix here
#endif
    
    
#ifdef __i386__

#elif __arm__
#endif
    
    return KERN_FAILURE;
}
